﻿@model IEnumerable<MVC.Models.Movie>

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
    @using (Html.BeginForm("Index","Movies",FormMethod.Get))
    {
       <p>
           Title:@Html.DropDownList("movieGenre","All")
           Title:@Html.TextBox("searchString")
           <input type="submit" value="搜索"/>
       </p>
    }

<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.Title)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ReleseDate)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Genre)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Price)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.ReleseDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Genre)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Price)
            </td>
            <td>
                @Html.ActionLink("修改", "Edit", new { id = item.ID }) |
                @Html.ActionLink("详细资料", "Details", new { id = item.ID }) |
                @Html.ActionLink("删除", "Delete", new { id = item.ID })
            </td>
        </tr>
    }

</table>
